package com.hankol.community.adapter

import android.widget.ImageView
import com.baselibrary.extension.checkValue
import com.baselibrary.extension.load
import com.baselibrary.utils.BannerSizeUtil
import com.baselibrary.utils.NumberUtils
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.hankol.community.R
import com.hankol.community.bean.SquareSpecialColumnBean


/**广场--专栏
 *@author:hanke
 *2022/3/30
 *desc:
 */
class SquareSpecialColumnAdapter : BaseQuickAdapter<SquareSpecialColumnBean, BaseViewHolder>(R.layout.item_square_special_column) {

    override fun convert(helper: BaseViewHolder, item: SquareSpecialColumnBean) {
        helper.apply {
            item.let {
                setText(R.id.tv_title, it.name.checkValue())
                setText(R.id.tv_sub_title, it.desc.checkValue())
                setText(R.id.tv_read_num_collect_num, "${NumberUtils.formatBigNum("${it.readNum}")}阅读  ${NumberUtils.formatBigNum("${it.favoriteNum}")}收藏")
                getView<ImageView>(R.id.img_cover).load(mContext, it.listCover.checkValue())
            }
        }
    }
}